home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / src / s / vms.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-04  |  6.6 KB  |  219 lines

  1. /* system description header for VMS
  2.    Copyright (C) 1986 Free Software Foundation, Inc.
  3.  
  4. This file is part of GNU Emacs.
  5.  
  6. GNU Emacs is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. GNU Emacs is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GNU Emacs; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. /* Synched up with: FSF 19.29. */
  21.  
  22. /*
  23.  *    Define symbols to identify the version of Unix this is.
  24.  *    Define all the symbols that apply correctly.
  25.  */
  26.  
  27. #ifndef VMS            /* Decus cpp doesn't define this but VAX C does */
  28. #define VMS
  29. #endif /* VMS */
  30. /* Note that this file is used indirectly via vms4-0.h, or some other
  31.    such file.  These other files define a symbol VMS4_0, VMS4_2, etc.  */
  32.  
  33. /* SYSTEM_TYPE should indicate the kind of system you are using.
  34.  It sets the Lisp variable system-type.  */
  35.  
  36. #define SYSTEM_TYPE "vax-vms"
  37.  
  38. /* Letter to use in finding device name of first pty,
  39.   if system supports pty's.  'a' means it is /dev/ptya0  */
  40.  
  41. #define FIRST_PTY_LETTER 'a'
  42.  
  43. /*
  44.  *    Define HAVE_PTYS if the system supports pty devices.
  45.  */
  46.  
  47. /* #define HAVE_PTYS */
  48.  
  49. /*
  50.  *    Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
  51.  *      The 4.2 opendir, etc., library functions.
  52.  *    (This is autoconfed, but configure probably doesn't
  53.  *    work on this system.)
  54.  */
  55.  
  56. #define NONSYSTEM_DIR_LIBRARY
  57.  
  58. /* If your system uses COFF (Common Object File Format) then define the
  59.    preprocessor symbol "COFF". */
  60.  
  61. /* #define COFF */
  62.  
  63. /* define MAIL_USE_FLOCK if the mailer uses flock
  64.    to interlock access to /usr/spool/mail/$USER.
  65.    The alternative is that a lock file named
  66.    /usr/spool/mail/$USER.lock.  */
  67.  
  68. /* #define MAIL_USE_FLOCK */
  69.  
  70. /* Define the maximum record length for print strings, if needed. */
  71.  
  72. #define MAX_PRINT_CHARS 300
  73.  
  74.  
  75. /* Here, on a separate page, add any special hacks needed
  76.    to make Emacs work on this system.  For example,
  77.    you might define certain system call names that don't
  78.    exist on your system, or that do different things on
  79.    your system and must be used only through an encapsulation
  80.    (Which you should place, by convention, in sysdep.c).  */
  81.  
  82. /* Do you have the shareable library bug?  If you link with a shareable
  83.    library that contains psects with the NOSHR attribute and also refer to
  84.    those psects in your program, the linker give you a private version of
  85.    the psect which is not related to the version used by the shareable
  86.    library.  The end result is that your references to variables in that
  87.    psect have absolutely nothing to do with library references to what is
  88.    supposed to be the same variable.  If you intend to link with the standard
  89.    C library (NOT the shareable one) you don't need to define this.  (This
  90.    is NOT fixed in V4.4...) */
  91.  
  92. #define SHAREABLE_LIB_BUG
  93.  
  94. /* Partially due to the above mentioned bug and also so that we don't need
  95.    to require that people have a shareable C library, the default for Emacs
  96.    is to link with the non-shared library.  If you want to link with the
  97.    shared library, define this and remake xmakefile and fileio.c. This allows
  98.    us to ship a guaranteed executable image. */
  99.  
  100. #define LINK_CRTL_SHARE
  101.  
  102. /* Define this if you want to read the file SYS$SYSTEM:SYSUAF.DAT for user
  103.    information.  If you do use this, you must either make SYSUAF.DAT world 
  104.    readable or install Emacs with SYSPRV.  */
  105.  
  106. /* #define READ_SYSUAF */
  107.  
  108. /* On VMS these have a different name */
  109.  
  110. #define unlink delete
  111.  
  112. #ifndef _GNUC_
  113. extern double mth$dmod(double, double);
  114. #define drem mth$dmod
  115. #endif
  116.  
  117. /* Some time rountines are missing in the VAX C RTL, or needs some
  118.    extra bit of code */
  119. #define tzset sys_tzset
  120. #define localtime sys_localtime
  121. #define gmtime sys_gmtime
  122.  
  123. /* On later versions of VMS these exist in the C run time library, but
  124.    we are using our own implementations.  Hide their names to avoid
  125.    linker errors */
  126. #define rename sys_rename
  127. #define execvp sys_execvp
  128. #define system sys_system
  129.  
  130. #ifndef GNU_MALLOC
  131. /* Hide these names so that we don't get linker errors */
  132. #define malloc sys_malloc
  133. #define free sys_free
  134. #define realloc sys_realloc
  135. #define calloc sys_calloc
  136.  
  137. /* Don't use the standard brk and sbrk */
  138. #define sbrk sys_sbrk
  139. #define brk sys_brk
  140. #endif
  141.  
  142. /* On VMS we want to avoid reading and writing very large amounts of
  143.    data at once, so we redefine read and write here. */
  144.  
  145. #define ENCAPSULATE_READ
  146. #define ENCAPSULATE_WRITE
  147.  
  148. /* sys_creat just calls the real creat with additional args of
  149.    "rfm=var", "rat=cr" to get "normal" VMS files... */
  150. #define ENCAPSULATE_CREAT
  151.  
  152. /* fwrite forces an RMS PUT on every call.  This is abysmally slow, so
  153.    we emulate fwrite with fputc, which forces buffering and is much
  154.    faster! */
  155. #define ENCAPSULATE_FWRITE
  156.  
  157. /* getuid only returns the member number, which is not unique on most VMS
  158.    systems.  We emulate it with (getgid()<<16 | getuid()). */
  159. #define getuid sys_getuid
  160.  
  161. /* If user asks for TERM, check first for EMACS_TERM.  */
  162. #define getenv sys_getenv
  163.   
  164. /* Standard C abort is less useful than it should be. */
  165. #define abort sys_abort
  166.  
  167. /* Case conflicts with C library fread. */
  168. #define Fread F_read
  169.  
  170. /* Case conflicts with C library srandom. */
  171. #define Srandom S_random
  172.  
  173. /* variable length too long... maybe */
  174. #if 0
  175. #define do_line_insertion_deletion_costs do_line_insertion_deletion_cost
  176. #endif
  177.  
  178. /* Cause initialization of vmsfns.c to be run.  */
  179. #define SYMS_SYSTEM syms_of_vmsfns ()
  180.  
  181. /* VAXCRTL access doesn't deal with SYSPRV very well (among other oddites...)
  182.    Here, we use $CHKPRO to really determine access. */
  183. #define ENCAPSULATE_ACCESS
  184.  
  185. #define    PAGESIZE    512
  186.  
  187. #define    _longjmp    longjmp
  188. #define    _setjmp        setjmp
  189.  
  190. globalref char sdata[];
  191. #define DATA_START (((int) sdata + 511) & ~511)
  192. #define TEXT_START 512
  193.  
  194. /* Baud-rate values from tty status are not standard.  */
  195.  
  196. #define BAUD_CONVERT  \
  197. { 0, 50, 75, 110, 134, 150, 300, 600, 1200, 1800, \
  198.   2000, 2400, 3600, 4800, 7200, 9600, 19200 }
  199.  
  200. #ifndef PURESIZE
  201. #define PURESIZE 330000
  202. #endif
  203.  
  204. /* Stdio FILE type has extra indirect on VMS, so must alter this macro.  */
  205.  
  206. #define PENDING_OUTPUT_COUNT(FILE) ((*(FILE))->_ptr - (*(FILE))->_base)
  207.  
  208. #define NULL_DEVICE "NLA0:"
  209.  
  210. #define TERMCAP_NAME "emacs_library:[etc]termcap.dat"
  211.  
  212. #define EXEC_SUFFIXES ".exe:.com"
  213.  
  214. /* Case conflict with Xlib XFree () */
  215. #define xfree emacs_xfree
  216.  
  217. /* What separator do we use in paths?  */
  218. #define SEPCHAR ','
  219.